FROM baldwinkm/jdk:8

ENV database_url='jdbc:mysql://172.17.0.1:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true' \
    database_user=yzstu database_pwd=yzstu \
    redis_url=172.17.0.1 redis_port=6379 redis_pwd=yzstu999
COPY ./lib/* /home/www/blog-web/

RUN cd /home/www/blog-web/ && \
    chmod 755 blog-web.sh

EXPOSE 8443

ENTRYPOINT ["bash","/home/www/blog-web/blog-web.sh", "start"]
